<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <title>新增</title>
    <link rel="stylesheet" href="${basePath}style.css">
    <link rel="stylesheet" href="${basePath}font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="add">
    <form class="addForm" action="${basePath}student?method=add" method="post">
        <table class="tableadd">
            <tr>
                <td>ID :</td>
                <td><input type="text" name="studentId"></td>

            </tr>
            <tr>
                <td>学号:</td>
                <td><input type="text" name="stuNum"></td>

            </tr>
            <tr>
                <td>姓名:</td>
                <td><input type="text" name="stuName"></td>

            </tr>
            <tr>
                <td>密码:</td>
                <td><input type="password" name="pawd" value="123456">
                    初始密码为123456
                </td>

            </tr>
            <tr>
                <td colspan="4" align="left" >
                    <button class="edit" onclick="window.history.back(-1);">
                        <i class="fa fa-arrow-left"></i>
                        返回
                    </button>
                    <button class="remove" type="submit">
                        <i class="fa fa-save"></i>
                        提交
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" type="text/javascript"></script>
<script  src="${basePath}validation/jquery.validate.js" type="text/javascript"></script>
<script  src="${basePath}validation/localization/messages_zh.js" type="text/javascript"></script>
<script>
    $(function(){
        $('.addForm').validate({
            rules:{
                studentId:{
                    required:true,
                    digits:true
                },
                stuNum:{
                    required:true,
                    digits:true
                },
                stuName:"required",
                pawd:{
                    required:true,
                    rangelength:[6,15]
                }
            }
        });
    });
</script>
</html>